package cn.yr.blog.controller.app;

import cn.yr.common.exception.ret.Ret;
import cn.yr.file.api.FileApi;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

/**
 * @author lang 1102076808@qq.com
 * @Description  文件上传
 * @Date 15:43 2021/5/23
 **/
@Api(tags = "app文件操作")
@RestController
@RequestMapping("/app/file")
public class AppFileController {

    @Resource
    FileApi fileApi;

    @RequestMapping("/upload")
    public Ret upload(MultipartFile file) {
        return fileApi.upload(file);
    }
}
